package word_help;

import java.util.ArrayList;
import java.util.List;

/**
 * User: luotao
 * Date: 11-9-20
 * Time: 15:53:00
 */
public class Word {
    public String enName = "";

    public String chName;

    private List<String> types = new ArrayList<String>();

    public List<String> getTypes() {
        return types;
    }
    
    


    public String getEnName() {
        return enName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }

    public String getChName() {
        return chName;
    }

    public void setChName(String chName) {
        this.chName = chName;
    }

    public void exactorStr(String s) {
        int i_spli1 = s.indexOf(SPLIT1);
        if (i_spli1 < 1) return;
        enName = s.substring(0, i_spli1);
        chName = s.substring(i_spli1+1);
    }

    private static final String SPLIT1 = "|"; 

    //private static String

    public static void main(String[] args) throws Exception {
        Word word = new Word();
        String s = "fond of ";

        word.exactorStr(s);
        System.out.println("word.getEnName() = " + word.getEnName());
    }
}
